package com.lipaluma.parser.builder;

import java.util.Date;

import com.lipaluma.field.mapper.FieldValidatedOnEachValue;
import com.lipaluma.field.validator.builder.ValidatorOnEachValueBuilder;
import com.lipaluma.field.validator.strategies.LengthStrategy;
import com.lipaluma.parser.AbstractDataParser;
import com.lipaluma.parser.DataParser;

public class FromParserValidatorOnEachValueBuilder<BUILDER extends AbstractDataParser.Builder<? extends DataParser<TARGET>, TARGET>, TARGET> {
	private FromParserFieldMapperBuilder<BUILDER, TARGET> parent;
	private ValidatorOnEachValueBuilder delegate;

	public FromParserValidatorOnEachValueBuilder(FromParserFieldMapperBuilder<BUILDER, TARGET> parent, FieldValidatedOnEachValue fieldValidated) {
		delegate = new ValidatorOnEachValueBuilder(null, fieldValidated);
		this.parent = parent;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> requiresEachValue() {
		delegate.requiresEachValue();
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> unique() {
		delegate.unique();
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> constant() {
		delegate.constant();
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> constant(Enum<?> value) {
		delegate.constant(value);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> constant(boolean value) {
		delegate.constant(value);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> constant(int value) {
		delegate.constant(value);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> constant(long value) {
		delegate.constant(value);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> constant(double value) {
		delegate.constant(value);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> constant(String value) {
		delegate.constant(value);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> constant(Date value) {
		delegate.constant(value);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> startsWith(String value) {
		delegate.startsWith(value);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> endsWith(String value) {
		delegate.endsWith(value);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> notStartsWith(String value) {
		delegate.notStartsWith(value);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> notStartsWithAtLeastOne(String... values) {
		delegate.notStartsWithAtLeastOne(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> notEndsWith(String... values) {
		delegate.notEndsWith(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> notEndsWithAtLeastOne(String... values) {
		delegate.notEndsWithAtLeastOne(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> notEmpty(String value) {
		delegate.notEmpty(value);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> contains(String... values) {
		delegate.contains(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> containsAtLeastOne(String... values) {
		delegate.containsAtLeastOne(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> notContains(String... values) {
		delegate.notContains(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> notContainsAtLeastOne(String... values) {
		delegate.notContainsAtLeastOne(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> matches(String pattern) {
		delegate.matches(pattern);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> includedIn(long... values) {
		delegate.includedIn(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> includedIn(int... values) {
		delegate.includedIn(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> includedIn(double... values) {
		delegate.includedIn(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> includedIn(String... values) {
		delegate.includedIn(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> includedIn(Date... values) {
		delegate.includedIn(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> includedIn(Enum<?>... values) {
		delegate.includedIn(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> excludedOf(long... values) {
		delegate.excludedOf(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> excludedOf(int... values) {
		delegate.excludedOf(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> excludedOf(double... values) {
		delegate.excludedOf(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> excludedOf(String... values) {
		delegate.excludedOf(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> excludedOf(Date... values) {
		delegate.excludedOf(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> excludedOf(Enum<?>... values) {
		delegate.excludedOf(values);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> length(int length) {
		delegate.length(length);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> length(int length, LengthStrategy strategy) {
		delegate.length(length, strategy);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> min(long min) {
		delegate.min(min);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> min(int min) {
		delegate.min(min);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> min(double min) {
		delegate.min(min);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> max(long max) {
		delegate.max(max);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> max(int max) {
		delegate.max(max);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> max(double max) {
		delegate.max(max);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> onRange(long min, long max) {
		delegate.onRange(min, max);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> onRange(int min, int max) {
		delegate.onRange(min, max);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> onRange(double min, double max) {
		delegate.onRange(min, max);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> isAfter(Date date) {
		delegate.isAfter(date);
		return this;
	}

	public FromParserValidatorOnEachValueBuilder<BUILDER, TARGET> isBefore(Date date) {
		delegate.isBefore(date);
		return this;
	}

	public FromParserFieldMapperAfterRegisterBuilder<BUILDER, TARGET> end() {
		return parent;
	}

}
